package hu.mapro.gwtui.gxt.client.recordseditor;

import hu.mapro.gwtui.client.Action;
import hu.mapro.gwtui.shared.data.ClassDataFactory;

import java.util.List;

import com.google.gwt.editor.client.EditorError;
import com.google.gwt.user.client.ui.Widget;
import com.google.web.bindery.requestfactory.shared.Receiver;

public interface PersistenceInterface<T, I> extends ClassDataFactory {
	
	I getInitializer();
	void newEditingContext();
	void list(Receiver<List<T>> receiver);
	void persist(T object, Receiver<Void> receiver);
	void merge(T object, Receiver<T> receiver);
	void delete(List<T> object, Receiver<Void> receiver);
	void addChangeHandler(Action handler);
	
}